package com.back.end.Controller.Web;

import com.back.end.Modal.User;
import com.back.end.Service.OrdersService;
import com.back.end.Service.WebUserService;
import com.back.end.vo.Result;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/Web/User")
@CrossOrigin
public class WebUsersController {
    @Resource
    WebUserService webUserService;


    @GetMapping("/getAllUsers")
    public Result getAllUsers() {
        List<User> users = webUserService.getAllUsers();
        return Result.success(users);
    }
}
